VERSION 5.00
Begin VB.Form frmGMain 
   Caption         =   "Form1"
   ClientHeight    =   3030
   ClientLeft      =   120
   ClientTop       =   450
   ClientWidth     =   4560
   LinkTopic       =   "Form1"
   ScaleHeight     =   3030
   ScaleWidth      =   4560
   StartUpPosition =   3  'Windows Default
   Begin VB.Timer ConnectionCheck 
      Interval        =   5
      Left            =   120
      Top             =   120
   End
   Begin VB.CommandButton btnLogout 
      Caption         =   "Logout"
      Height          =   375
      Left            =   240
      TabIndex        =   0
      Top             =   2520
      Width           =   1215
   End
End
Attribute VB_Name = "frmGMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim tomenu As Boolean

Private Sub btnLogout_Click()
    If IsConnected Then _
        Call CMD_LogOutUser(NameOfUser)
End Sub

Private Sub ConnectionCheck_Timer()
If tomenu = True Then
    Call TimerDisconnected
Else
    Call TimerDisconnected(True)
End If
End Sub

Private Sub Form_Load()
    tomenu = True
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    tomenu = False
    If IsConnected Then
        Call CMD_LogOutUser(NameOfUser)
        Cancel = True
    End If
End Sub
